<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设备详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-device-edit" th:object="${bizDevice}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">租户标识：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{tenantId}"></div>
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">用户ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="form-control-static" th:text="*{userId}"></div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">商户ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="form-control-static" th:text="*{merchId}"></div>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">预留：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{reserve}"></div>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">设备类型：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="form-control-static" th:text="${@dict.getLabel('deviceType',bizDevice.deviceType)}"></div>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备名称：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{name}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{deviceCode}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备二维码：</label>
                <div class="col-sm-8">
                    <img width="300" th:src="${bizDevice.qrCode}">
                    <a target="_blank" th:href="${bizDevice.qrCode}"><div class="form-control-static" th:text="*{qrCode}"></div></a>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">固件版本：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{firmwareVersion}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最近一次订单号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{lastOrderNo}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物联网卡号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{iotCardNumber}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">维度：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{lat}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经度：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{lon}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备场地：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{position}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">信号强度0-100：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{signalIntensity}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">折扣：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{discount}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">门锁状态：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('doorLockStatus',bizDevice.doorLockStatus)}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最新补货时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(bizDevice.lastReplenishmentTime, 'yyyy-mm-dd HH:mm:ss')}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最新上送数据时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(bizDevice.lastUpdateTime, 'yyyy-mm-dd HH:mm:ss')}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客服电话：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{customerServicePhone}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最大端口数：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="*{maxCargoLane}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">到期时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(bizDevice.dueDtime, 'yyyy-mm-dd HH:mm:ss')}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">续费状态：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('renewStatus',bizDevice.renewStatus)}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">安装状态：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('yesOrNo',bizDevice.stockStatus)}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">在线状态：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('lineStatus',bizDevice.lineStatus)}"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('enableStatus',bizDevice.status)}"></div>
                </div>
            </div>
        </form>
        <div class="form-control-static" style="text-align:center;">
            <button th:onclick="'javascript:closeItem()'" class="btn btn-danger" type="button">关闭</button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        //使页面不可编辑
        function disableOcx() {
            var form = document.forms[0];
            for ( var i = 0; i < form.length; i++) {
                var element = form.elements[i];
                //部分元素可以编号 element.name 是元素自定义 name
                if (element.name != "auditEntity.auditContent"
                        && element.name != "auditEntity.auditAutograph"
                        && element.name != "auditEntity.auditTime"
                        && element.name != "auditEntity.auditState"
                        && element.name != "submitBtn"
                        && element.name != "reset"
                        && element.name != "id"
                        && element.name != "processInstanceId"
                        && element.name != "updateForm") {
                    element.disabled = "true";
                }
            }
        }
        window.onload = disableOcx;//当页面加载的时候执行此函数
        var prefix = ctx + "biz/device";

        $("input[name='lastReplenishmentTime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "1",
            autoclose: true
            // format: "yyyy-mm-dd",
            // minView: "month",
            // autoclose: true
        });

        $("input[name='lastUpdateTime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "1",
            autoclose: true
            // format: "yyyy-mm-dd",
            // minView: "month",
            // autoclose: true
        });

        $("input[name='dueDtime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "1",
            autoclose: true
            // format: "yyyy-mm-dd",
            // minView: "month",
            // autoclose: true
        });
    </script>
</body>
</html>